package zy.gongxiang.pucharse.exception;

import zy.gongxiang.pucharse.enums.ResultEnum;

/**
 * @Auther: zhangy
 * @Date: 2018/9/19 00:03
 * @Description:
 */
public class CommonException extends RuntimeException {

    private Integer code;

    public CommonException(ResultEnum resultEnum) {
        //将消息传给父类
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public CommonException(Integer code,String message){
        super(message);
        this.code = code;


    }
}
